Reliable focusing algorithms are needed for deep ultra-violet, ultra-violet, visible, and infrared inspection platforms and for digital microscopes, e.g. for such devices as used in the semiconductor industry, material, medical, and biological production and science.